Skip to content

Conversation

@chenkins
Copy link
Contributor

Resolves #209

@chenkins chenkins force-pushed the 209-uvf-compliance branch 2 times, most recently from 3cea6e3 to c981056 Compare November 4, 2025 08:58

@Test
void decryptWithRecoveryKey() throws ParseException, JOSEException, NoSuchAlgorithmException, InvalidKeySpecException, NotECKeyException, JsonProcessingException {
@Disabled("TODO uvf.spec.version missing in protected.")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resolve.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dkocher dkocher added this to the 1.0.0 milestone Nov 4, 2025
Comment on lines +329 to +332
final Object uvfSpecVersion = jweObject.getHeader().getCustomParams().get(UVF_SPEC_VERSION_KEY_PARAM);
if(!"1".equals(uvfSpecVersion)) {
throw new SecurityFailure(String.format("Unexpected value for critical header %s: found %s, expected \"1\"", UVF_SPEC_VERSION_KEY_PARAM, uvfSpecVersion));
}
Copy link
Contributor Author

@chenkins chenkins Nov 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@overheadhunter do we need/want to verify the spec version? Same then web.

https://datatracker.ietf.org/doc/html/rfc7515#section-4.1.11

Recipients MAY consider the JWS to be invalid if the critical
list contains any Header Parameter names defined by this
specification or [JWA] for use with JWS or if any other constraints on its use are violated.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, needs to be checked. Also it needs to be an integer, not a String!

@chenkins chenkins mentioned this pull request Nov 6, 2025
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Review UVFMetadata compliance.

4 participants